package com.example.memurbac_service.servicelmp;


import com.example.memurbac_service.dao.RoleAuthMapper;
import com.example.memurbac_service.dao.UlogMapper;
import com.example.memurbac_service.pojo.RoleAuth;
import com.example.memurbac_service.service.RoleAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleAuthServiceImpl implements RoleAuthService {
    /** 注入 mybaties mapper 接口*/
    @Autowired
    RoleAuthMapper mapper;


    /**
     * 给角色添加权限集合
     */
    @Override
    public int addRoleAuths(int roleid, int authids) {
        return mapper.addRoleAuths(roleid,authids);
    }
    /**
     * 删除该角色所有权限
     */
    @Override
    public int delallRoleAuth(int roleid) {
        return mapper.delallRoleAuth(roleid);
    }
    /**
     * 查询角色绑定的权限集合
     */
    @Override
    public List<Integer> reachRoleAuths(int roleid) {
        return mapper.reachRoleAuths(roleid);
    }
}
